package com.huawei123.hasee.cniao5store.mvp.view.fragment;

import android.view.View;
import android.widget.TextView;

import com.huawei123.hasee.cniao5store.R;
import com.huawei123.hasee.cniao5store.base.BaseFragment;
import com.huawei123.hasee.cniao5store.utils.UIUtils;
import com.huawei123.hasee.cniao5store.view.LoadingPager;
import com.huawei123.hasee.cniao5store.view.widget.EnterLayout;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 项目名称：Cniao5Store
 * 类描述：管理界面
 * 创建人：Administrator
 * 创建时间：2017/10/25 0025 下午 4:59
 * 修改人：Administrator
 * 修改时间：2017/10/25 0025 下午 4:59
 * 修改备注：
 */

public class AppManagerFragment extends BaseFragment {
    @BindView(R.id.update_label_textview)
    TextView tvUpdateLabel ;
    @BindView(R.id.update_label_subtitle)
    TextView tvUpdateLabelSubtitle ;
    @BindView(R.id.install_manager_layout)
    EnterLayout installManager ;
    @BindView(R.id.apk_manager_layout)
    EnterLayout apkManager ;
    @BindView(R.id.system_manager_layout)
    EnterLayout systemManager ;
    @BindView(R.id.connect_computer)
    EnterLayout connect ;

    @Override
    protected void loading() {
        setState(LoadingPager.LoadResult.success);

//        new Thread(new Runnable() {
//            @Override
//            public void run() {
//                SystemClock.sleep(2000);
//                setState(LoadingPager.LoadResult.error);
//            }
//        }).start();
    }

    @Override
    protected View createSuccessView() {
        View view = UIUtils.inflate(R.layout.fragment_manager);
        ButterKnife.bind(this,view);
        tvUpdateLabel.setText(UIUtils.getString(R.string.update_manager_title));
        tvUpdateLabelSubtitle.setText(UIUtils.getString(R.string.update_manager_subtitle_version_new));
        installManager.setTitle(UIUtils.getString(R.string.install_manager_title_ex));
        installManager.setMemo(UIUtils.getString(R.string.install_manager_subtitle));
        apkManager.setTitle(UIUtils.getString(R.string.apk_management));
        apkManager.setMemo(UIUtils.getString(R.string.apkmanage_tips_modify));
        systemManager.setTitle(UIUtils.getString(R.string.system_manager_title));
        systemManager.setMemo(UIUtils.getString(R.string.system_manager_memo));
        connect.setTitle(UIUtils.getString(R.string.connect_pc));
        connect.setMemo(UIUtils.getString(R.string.manager_phone_by_pc));

        return view;
    }
}
